<?php

/**
 * Helpers Reports
 * 
 * Arquivo de ajuda para algumas funções usadas no site.
 * 
 * @package Helpers
 * @category Utils
 * @author Carlos Carvalho
 */
if (!function_exists('get_money_format')) {
    /**
     * get money format
     * 
     * Return value float formated  
     * 
     * @param float $number
     * @param strin $format
     * @param int $precision
     * @return string
     * 
     */        
    function get_money_format($number, $format = 'USD', $precision = 2) {
        switch ($format) {
            case 'BRL':
                return number_format((double) $number, $precision, ',', '.');
                break;
            case 'EUR':
                break;
            case 'USD':
            default:
                return number_format((double) $number, $precision);
                break;
        }
    }

}